<div class="bt-reset">
<div class="container-12-fluid">
	<div class="container-12-row">
        
	<!-- Loop -->
		<div class="large-12">
			<?php 
				$placeHolder = get_template_directory_uri() . '/admin/assets/images/addpeople.png';
				$aData = get_post_meta($post->ID, $post->post_type, true);
				$aMerge = isset($aData['ourteam']) ? $aData['ourteam'] : array();
				$aOurTeam = wp_parse_args($aMerge, array("photo"=>$placeHolder, "position"=>"",  "introduction"=>"", "social_name"=>array("Social networks"), "social_link"=>array("#"), "social_icon"=>array( "fa fa-home" )));
				// var_dump($aOurTeam);
			?>
			<div class="panel">

                <div class="panel-heading">

                    <div class="panel-options">
                        <!-- <a href="#" title="Copy this "><i class="fa fa-copy"></i></a> -->
                        <!-- <a href="#" title="Delete this "><i class="fa fa-times"></i></a> -->
                    </div>
                </div>

                <div class="panel-body">
                    <div class="form-avatar">
                    	<input type="hidden" name="ourteam[photo]" value="<?php echo $aOurTeam['photo'] ?>">
                        <a href="#" class="upload-image singular_upload">
                        	<div class="lux-gallery">
                        		<?php if ( !empty($aOurTeam['photo']) ) echo '<img src="'.$aOurTeam['photo'].'" alt="our team">'; ?>
                        	</div>
                        </a>
                  <!--       <div class="wrap-gallery">
                        	
                        </div> -->
              <!--           <div class="del-img">
                        	<a href="#" title="Delete avatar"><i class="fa fa-times"></i></a>
                        </div> -->
                    </div>
<!--                     <div class="form-group">
                        <label class="form-label">Name:</label>
                        <div class="controls">
                            <input type="text" value="" name="ourteam[name]" class="form-control">
                        </div>
                    </div> -->

                    <div class="form-group">
                        <label class="form-label">Position</label>
                        <div class="controls">
                            <input type="text" value="<?php echo stripslashes($aOurTeam['position']); ?>" name="ourteam[position]" class="form-control">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">A Small Introduction</label>
                        <div class="controls">
                            <textarea name="ourteam[introduction]" class="form-control" placeholder=""><?php echo stripslashes($aOurTeam['introduction']); ?></textarea>
                        </div>
                    </div>




                    <!-- Toggle -->
                    <div class="toggle-social">

                    	<?php 
                            $i = 0;
                            foreach ($aOurTeam["social_name"] as $k => $v ):  
                                $firstItem = $i == 0 ? 'not-remove' : '';
                                $i++;
                        ?>
                    	<div class="wrap-social">
                            <h4 class="toggle-title"><?php echo stripslashes($v); ?>
                                <i class="fa fa-times right wo-delete-social <?php echo $firstItem; ?>"></i>
                                <!-- <i class="fa fa-copy ri"></i> -->
                            </h4>
                            <div class="toggle-content">
                                <div class="form-group">
                                    <label class="form-label">Name</label>
                                    <div class="controls">
                                        <input type="text" value="<?php echo stripslashes($v); ?>" name="ourteam[social_name][]" class="form-control">
                                    </div>
                                </div>
                                <div class="form-group icon-wrap">
                                    <label class="form-label">Social Icon </label>
                                        <a href="#TB_inline?width=600&height=550&inlineId=table-fa" class="available-panel thickbox">Change icon
                                            <i class="<?php echo $aOurTeam['social_icon'][$k] ?>"></i>
                                        </a>
                                        <input type="hidden" name="ourteam[social_icon][]" class="social_icon" value="<?php echo $aOurTeam['social_icon'][$k] ?>">
                                    
                                </div>
                                <div class="form-group">
                                    <label class="form-label">Link</label>
                                    <div class="controls">
                                        <input type="text" value="<?php echo $aOurTeam['social_link'][$k] ?>" name="ourteam[social_link][]" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>
                    	<?php endforeach; ?>
                    	<div class="form-group add-toggle add-social">
                            <div class="controls">
                                <input type="submit" value="Add" class="button wo-addsocial">
                            </div>
                        </div>

                    </div>

                </div>
            </div>
        </div>
    <!-- END LOOP -->

	</div>
</div>
</div>